<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core">
    <h:head>
        <title>Entrada de Dados</title>
    </h:head>
    <h:body>
        <h:form id="formulario" >
            <h:inputHidden value="#{controleEntrada.id}" 
                           id="id"/>
            <h:panelGrid columns="2"> 
                <f:facet name="header"> Dados da Pessoa </f:facet>
                <h:outputLabel value="Nome" 
                               for="nome"/>
                <h:inputText value="#{controleEntrada.nome}" 
                             id="nome" 
                             size="50"
                             maxlength="50"/>
                <h:outputLabel value="Senha" 
                               for="senha"/>
                <h:inputSecret value="#{controleEntrada.senha}" 
                               redisplay="true"
                               id="senha"
                               size="10"
                               maxlength="10"
                               />
                <h:outputLabel value="Observação" for="obs"/>
                <h:inputTextarea value="#{controleEntrada.obs}" 
                                 cols="30"
                                 rows="6"
                                 id="obs"
                                 />
                <h:outputLabel value="Grau de Instrução" for="grau"/>
               <!-- <h:selectOneMenu value="#{controleEntrada.grauInstrucao}" id="grau"> 
                     gerado de maneira estática 
                     <f:selectItem itemLabel="Ensino Fundamental" itemValue="Ensino Fundamental" />
                     <f:selectItem itemLabel="Ensino Médio" itemValue="Ensino Médio" />
                     <f:selectItem itemLabel="Ensino Superior" itemValue="Ensino Superior" /> 
                    <f:selectItem itemLabel="Selecione" noSelectionOption="true"/>
                    <f:selectItems var="item" value="#{controleEntrada.grauinstrucao}" 
                                   itemValue="#{item}" 
                                   itemLabel="#{item}"  
                                   />

                </h:selectOneMenu> -->
                <!-- 
                  <h:selectOneRadio value="#{controleEntrada.grauInstrucao}" id="grau"> 
                  
                  <f:selectItems var="item" value="#{controleEntrada.grauinstrucao}" 
                                 itemValue="#{item}" 
                                 itemLabel="#{item}"  
                                 />

                  </h:selectOneRadio> -->
                <h:selectOneListbox value="#{controleEntrada.grauInstrucao}" id="grau"> 

                    <f:selectItems var="item" value="#{controleEntrada.grauinstrucao}" 
                                   itemValue="#{item}" 
                                   itemLabel="#{item}"  
                                   />

                </h:selectOneListbox>
                
                <h:outputLabel value="Tecnologias" for="tec"/>
                <h:selectManyCheckbox value="#{controleEntrada.selecionadas}" >
                    <f:selectItems var="item" 
                                   value="#{controleEntrada.tecnologia}"
                                   itemValue="#{item}"
                                   itemLabel="#{item}"
                                   />

                </h:selectManyCheckbox>
                <h:column >
                    <div align="center">
                        <h:commandButton value="Processar"
                                         action="#{controleEntrada.processa()}"/>
                    </div>
                </h:column>
            </h:panelGrid> 

        </h:form>
        <h:outputText value="#{controleEntrada.saida}" escape="false"/>
    </h:body>
</html>

